import pyautogui
def getTitle():
    window_titles = pyautogui.getAllTitles()
    for title in window_titles:
        if title is not "":
            print(title)